import request from '@/utils/request'

// 查询获奖信息列表
export function listAwards(query) {
  return request({
    url: '/awards/awards/list',
    method: 'get',
    params: query
  })
}

// 查询获奖信息详细
export function getAwards(awardId) {
  return request({
    url: '/awards/awards/' + awardId + "?pageNum=1&pageSize=100",
    method: 'get'
  })
}

// 新增获奖信息
export function addAwards(data) {
  return request({
    url: '/awards/awards',
    method: 'post',
    data: data
  })
}

// 修改获奖信息
export function updateAwards(data) {
  return request({
    url: '/awards/awards',
    method: 'put',
    data: data
  })
}

// 删除获奖信息
export function delAwards(awardId) {
  return request({
    url: '/awards/awards/' + awardId,
    method: 'delete'
  })
}


// 根据老师id获取下面的学生 , 然后根据学生学号获取获奖信息返回
export function listByTeacher(teacherid) {
  return request({
    url: `/awards/awards/listByTeacherId/${teacherid}`,
    method: 'get'
  })
}


//  筛选
export function listByTeacherByParams(query , teacherId) {
  return request({
    url: `/awards/awards/listByFilter/${teacherId}`,
    method: 'get',
    params: query
  })
}